package com.fanhang.samples.spring.sql2o.common;

import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;

public interface Sql2oOperations {

	public int update(CharSequence sql);
	public int update(CharSequence sql, Map<String, ?> paramMap);
	public int[] update(String[] sqls) throws DataAccessException;
	public int updates(String sql, List<Map<String, ?>> paramsList) throws DataAccessException;
	public Integer getCount(CharSequence sql) throws DataAccessException;
	public Integer getCount(CharSequence sql, Map<String, ?> paramMap) throws DataAccessException;
	public <T> T fetchFirst(CharSequence sql, Class<T> clazz) throws DataAccessException;
	public <T> T fetchFirst(CharSequence sql, Map<String, ?> paramMap, Class<T> clazz) throws DataAccessException;
	public <T> List<T> fetch(CharSequence sql, Class<T> clazz) throws DataAccessException;
	public <T> List<T> fetch(CharSequence sql, Map<String, ?> paramMap, Class<T> clazz) throws DataAccessException;

}
